import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
const Appointment = () => import('../views/appointment/Appointment')
const NotComing = () => import('../views/appointment/NotComing')
const AlreadyComing = () => import('../views/appointment/AlreadyComing')
const OnceComing = () => import('../views/appointment/OnceComing')
import OrderSettlement from '../views/order/orderSettlement.vue'
const OrderList = () => import('../views/order/orderList.vue')
const PaymentMethod = () => import('../views/paymentMethod.vue')
const Gift = () => import('../views/gift/gift.vue')
const homecontent = () => import('../views/homecontent/homecontent.vue')
const aaddproject = () => import('../views/aaddproject/aaddproject.vue')
const Settlement = () => import('../views/Settlement');
const vip = () => import('../views/vip/vip.vue')
const vipmessage = () => import('../views/vip/vipmessage.vue')
const vippay = () => import('../views/vip/vippay.vue')
import technicians from '../views/technicians/technicians.vue'
const techniciansNow = () => import('../views/technicians/techniciansNow.vue')
const techniciansAll = () => import('../views/technicians/techniciansAll.vue')



Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/Home/homecontent'
  },
  {
    path: '/Home',
    name: 'Home',
    component: Home,
    // redirect: '/Home/homecontent',
    // 子路由
    children: [
      //技师页面
      {
        path: 'technicians',
        // name: 'technicians',
        component: technicians,

        children: [{
            path: '/',
            redirect: '/Home/technicians/techniciansNow'
          },
          {
            path: 'techniciansNow',
            name: 'techniciansNow',
            component: techniciansNow
          },
          {
            path: 'techniciansAll',
            name: 'techniciansAll',
            component: techniciansAll
          },
        ]
      },
      // 我页面
      // 房间首页
      {
        path: 'homecontent',
        name: 'homecontent',
        component: homecontent,
      },
      // 房间选择服务页面
      {
        path: 'aaddproject',
        name: 'aaddproject',
        component: aaddproject,
      },
      // 谷页面
      {
        path: 'appointment',
        name: 'Appointment',
        component: Appointment,
        redirect: '/Home/appointment/notComing',
        children: [{
            path: '/Home/appointment/notComing',
            name: 'NotComing',
            component: NotComing
          },
          {
            path: '/Home/appointment/alreadyComing',
            name: 'AlreadyComing',
            component: AlreadyComing
          },
          {
            path: '/Home/appointment/onceComing',
            name: 'OnceComing',
            component: OnceComing
          },
        ]
      },
      //结算订单
      {
        path: 'orderSettlement',
        name: 'OrderSettlement',
        component: OrderSettlement
      },

      {
        path: '/Home/settlement',
        name: 'Settlement',
        component: Settlement
      },
      //礼品
      {
        path: 'gift',
        name: 'Gift',
        component: Gift,
       
      },
      //支付方式
      {
        path: 'paymentMethod',
        name: 'PaymentMethod',
        component: PaymentMethod
      },
      //订单列表
      {
        path: 'orderList',
        name: 'OrderList',
        component: OrderList,
      },
      {
        path: 'vip',
        name: 'vip',
        component: vip,
        children: [{
            path: 'vippay',
            name: 'vippay',
            component: vippay
          },
          {
            path:'vipmessage/:ss',
            name: 'vipmessage',
            component: vipmessage
          }
        ]
      },
    ]
  }
]


const router = new VueRouter({
  routes
})

export default router